package com.itheima.service.impl;

import com.itheima.mapper.SysLogMapper;
import com.itheima.pojo.SysLog;
import com.itheima.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author ChaunceyZhang
 * @date 2022-10-22 18:10
 * @blog1 https://zephyr-cyber.github.io/
 * @blog2 https://www.yuque.com/gougougou-xwscx
 */
@Service
public class LogServiceImpl implements LogService {

    @Autowired
    private SysLogMapper sysLogMapper;

    @Override
    @Transactional(propagation = Propagation.REQUIRES_NEW)
    public int save(SysLog sysLog) {

        return sysLogMapper.save(sysLog);

    }
}
